package cn.iocoder.yudao.module.ordering.controller.admin.food.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 订餐-餐品信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class FoodRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19803")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @ExcelProperty("名称")
    private String name;

    @Schema(description = "餐品类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "餐品类型", converter = DictConvert.class)
    @DictFormat("ordering_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String type;

    @Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "28441")
    @ExcelProperty("价格")
    private BigDecimal price;

    @Schema(description = "图片", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("图片")
    private String picture;

    @Schema(description = "说明", example = "你说的对")
    private String description;

    @Schema(description = "状态，0下架，1在售", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("状态，0下架，1在售")
    private Integer status;

    @Schema(description = "可订餐开始日期")
    @ExcelProperty("可订餐开始日期")
    private LocalDateTime dateStart;

    @Schema(description = "可订餐结束日期")
    @ExcelProperty("可订餐结束日期")
    private LocalDateTime dateEnd;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "是否已订餐")
    private Boolean hasOrdered;
    @Schema(description = "订单记录")
    private Long recordId;
}
